Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up App.xaml.cs #1628

Merged
merged 2 commits into from
Jan 12, 2025
Merged

Clean up App.xaml.cs #1628

merged 2 commits into from
Jan 12, 2025

Conversation

MGGSK
Copy link
Contributor

@MGGSK MGGSK commented Oct 1, 2024

Cleaned up the app.xaml.cs file.

Description

1.Removed UWP code from the file.
2.Added comments to the file.
3.Made the code cleaner.
4.Removed unused code.

Motivation and Context

UWP code should not be in a WinUI app.

How Has This Been Tested?

No testing needed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

WinUIGallery/App.xaml.cs Outdated Show resolved Hide resolved
@karkarl
Copy link
Collaborator

karkarl commented Nov 13, 2024

/azp run

public Frame GetRootFrame()
{
Frame rootFrame;
NavigationRootPage rootPage = StartupWindow.Content as NavigationRootPage;
var rootPage = StartupWindow.Content as NavigationRootPage;
if (rootPage == null)
Copy link
Contributor

@niels9001 niels9001 Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we fix this, could we do this instead:

if (StaturWindow.Content is NavigationRootPage rootpage)

@MGGSK MGGSK closed this Dec 6, 2024
@MGGSK MGGSK force-pushed the Cleanup-app.xaml.cs branch from f2ad3b1 to 96beae3 Compare December 6, 2024 16:19
@MGGSK MGGSK reopened this Dec 6, 2024
@MGGSK MGGSK closed this Dec 6, 2024
@MGGSK MGGSK reopened this Dec 6, 2024
@marcelwgn
Copy link
Contributor

/azp run

@marcelwgn marcelwgn merged commit 68c7970 into microsoft:main Jan 12, 2025
2 checks passed
@MGGSK MGGSK deleted the Cleanup-app.xaml.cs branch January 12, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants